import { LOGIN_TOKEN } from '../actionTypes'

// 实例化reducer
function login (state = '', action) {
  switch (action.type) {
    case LOGIN_TOKEN:
      // 保存token
      return action.payload
    default:
      return state
  }
}

// 暴露出去
export default login
